<?php
/* @authorcode  codestrings
 * @copyright   Leyun internet Technology(Shanghai)Co.,Ltd
 * @license     http://www.dzzoffice.com/licenses/license.txt
 * @package     DzzOffice
 * @link        http://www.dzzoffice.com
 * @author      zyx(zyx@dzz.cc)
 */
if(!defined('IN_DZZ')) {
	exit('Access Denied');
}
$metaperm=1;
if(!$_G['cache']['corpus:setting']) loadcache('corpus:setting');
$metaset=$_G['cache']['corpus:setting']['meta_setting'];
$meta=C::t('corpus_meta')->fetch_by_cid($cid);
if(submitcheck('metasubmit')){
	
	C::t('corpus_meta')->insert_by_cid($cid,$_GET['metadata']);
	exit(json_encode(array('msg'=>'success')));
}else{
	$meta['title']=$meta['title']?$meta['title']:$corpus['name'];
	$meta['reference_id']=$meta['reference_id']?$meta['reference_id']:'RMHCN_'.$cid;
	$meta['print_book_isbn']=$meta['print_book_isbn']?$meta['print_book_isbn']:$corpus['isbn'];
	include template('list/metadata');
}



?>
